#ifndef TRANSFERPASSIVE_H
#define TRANSFERPASSIVE_H

#include "common/networkhandler.h"
#include "codec/vpxencoder.h"
#include "graberclass.h"
#include "inputsimulator.h"
#include <QObject>


class PassiveHandler : public NetWorkHandler
{
    Q_OBJECT
public:
    explicit PassiveHandler(QObject *parent = nullptr);

    void dealProto(int i,BigPack::Exchange resv_exc) override;
public slots:
    void sendVpxImage(quint16 posX, quint16 posY,int width,int height, const QByteArray &imageData, quint16 tileNum);
    void sendImageParameters(const QSize &imageSize);
    void imageEnqueue(int pox,int poy,const QImage &image,int sendNum);
    void sendHearbeat();
signals:
    void tfShowDeviceId(QString);

signals:
    void receivedNum(int num);
    void showDeviceId(QString);
    void startSreenShot();
    void closeSreenShot();
    void newConnectSoFlash();
    void authenticatedStatus(bool);
    void changeDisplayNum();
    void setKeyPressed(quint16 keyCode, bool state);
    void setMousePressed(quint16 keyCode, bool state);
    void setWheelChanged(bool deltaPos);
    void setMouseMove(quint16 posX, quint16 posY);
    void setMouseDelta(qint16 deltaX, qint16 deltaY);
protected:
    void createToHandler() override;

private:
    //抓图
    GraberClass *m_graberClass;
    //输入模拟
    InputSimulator *m_inputSimulator;
    //是否认证
    bool m_isAuthenticated ;

private:
    VpxEncoder *m_vpxEncoder ;
};

#endif // TRANSFERPASSIVE_H
